<template>
  <div>
    御剑乘风来,除魔天地间!===home
    <div style="width:200px;height:200px;" id="main"></div>
  </div>
</template>
           
<script>
import * as echarts from 'echarts'
export default {
  name: '',
  data() {
    return {}
  },
  created() {},
  computed: {},
  methods: {},
  mounted() {
    var chartDom = document.getElementById('main')
    var myChart = echarts.init(chartDom)
    var option

    option = {
      tooltip: {
        trigger: 'item',
      },
      legend: {
        top: '5%',
        left: 'center',
      },
      series: [
        {
          name: 'Access From',
          type: 'pie',
          radius: ['40%', '70%'],
          avoidLabelOverlap: false,
          label: {
            show: false,
            position: 'center',
          },
          emphasis: {
            label: {
              show: true,
              fontSize: '40',
              fontWeight: 'bold',
            },
          },
          labelLine: {
            show: false,
          },
          data: [
            { value: 1048, name: 'Search Engine' },
            { value: 735, name: 'Direct' },
            { value: 580, name: 'Email' },
            { value: 484, name: 'Union Ads' },
            { value: 300, name: 'Video Ads' },
          ],
        },
      ],
    }

    option && myChart.setOption(option)
  },
}
</script>
<style lang='less'  scoped>
</style>